package com.example.spring.design.composite.lucency;

/**
 * @author: orange
 * @create: 2023-08-20 00:06
 * @description:
 */
public abstract class AbstractCommodity extends AbstractComponent {
    abstract double getPrice();
    abstract int getNum();

    @Override
    public double calc() {
        return getPrice() *  calc();
    }
}
